import {UIRouter} from "@uirouter/angular";
import {StateTree} from "@uirouter/visualizer";
import {Injector, Injectable} from "@angular/core";
// import {PeopleService} from "../services/people.service"

export function uiRouterConfigFn(router: UIRouter, injector: Injector) {
//   const peopleService = injector.get(PeopleService);
  
  // Plunker embeds can time out.  
  // Pre-load the people list at startup.
//   peopleService.getAllPeople();
  
  //没有匹配时 ， 默认跳转到/market 页面
  // router.urlService.rules.otherwise({ state: 'market' });
  
  // Use ui-router-visualizer to show the states as a tree
//   StateTree.create(router, document.getElementById('statetree'), { width: 200, height: 100 });
    // console.log('do sth.');
}